import './assets/main.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import { regionData } from 'element-china-area-data'
import axios from 'axios';
// 创建一个新的 Axios 实例
const instance = axios.create();

// 添加JWT token信息
instance.defaults.headers.common["Authorization"] = "Bearer " + window.localStorage.getItem("token");
export default {
    data() {
        return {
            regionData,
            selectedOptions: []
        }
    },
}
const app = createApp(App)
app.use(router)
app.use(ElementPlus, {
    locale: zhCn,
})
app.use(createPinia().use(piniaPluginPersistedstate))
app.use(router)
app.mount('#app')

